package cn.tedu.boot11.controller;

import cn.tedu.boot11.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController {
    @RequestMapping("/hello")
    @ResponseBody
    public String hello(){
        return "请求成功!";
    }

//    @RequestMapping("/reg")
//    @ResponseBody
//    public String reg(String username,String password,String nick){
//        return username+":"+password+":"+nick;
//    }

    @RequestMapping("/reg")
    @ResponseBody
    public String reg(User user){
        return user.toString();
    }
}
